The base class for all crops.
void Crop::ChooseNextCrop |
( |
int |
a_no_dates | ) |
|
Chooses the next crop to grow in a field.
The function finds the next crop to grow on a field where the current crop's management has finished. If necessary, it adjusts current crop's management to the new crop.
335 g_msg->
Warn(
WARN_BUG,
"Crop::ChooseNextCrop(): ",
"Harvest too late for the next crop to start!!!" );
339 for (
int i=0; i<a_no_dates; i++) {
class Calendar * g_date
Definition: calendar.cpp:38
int GetYearNumber(void)
Definition: calendar.h:68
int DayInYear(void)
Definition: calendar.h:58
bool value(void)
Definition: configurator.h:135
FarmEvent * m_ev
Definition: farm.h:539
Farm * m_farm
Definition: farm.h:537
LE * m_field
Definition: farm.h:538
TTypesOfFarm GetType(void)
Definition: farm.h:901
int GetMDates(int a, int b)
Definition: elements.h:341
void SetMConstants(int a, int c)
Definition: elements.h:344
void SetMDates(int a, int b, int c)
Definition: elements.h:342
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
A farm that carries out crop, pesticide and fertilizer planning using simplified optimisation or othe...
Definition: farm.h:2029
void Match_crop_to_field(LE *a_field)
Finds a crop to be grown on a given field next year.
Definition: farm.cpp:9161
CfgBool cfg_OptimisingFarms("OPTIMISING_FARMS", CFG_CUSTOM, false)
If set to true, the farmer decision making model is active.
CfgBool cfg_OptimiseBedriftsmodelCrops("OPTIMISE_BEDRIFTSMODEL_CROPS", CFG_CUSTOM, false)
If set to true, the original farm optimisation model's crop set is used in the farmer decision making...
@ tof_OptimisingFarm
Definition: farm.h:273
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
@ WARN_BUG
Definition: maperrormsg.h:34
int m_startday
Definition: farm.h:466
References cfg_OptimiseBedriftsmodelCrops, cfg_OptimisingFarms, Calendar::DayInYear(), g_date, g_msg, Calendar::GetYearNumber(), OptimisingFarm::Match_crop_to_field(), tof_OptimisingFarm, CfgBool::value(), MapErrorMsg::Warn(), and WARN_BUG.